package com.samuel.profile;


import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;

/**
 * @date:2017/11/22
 * @time: 11:05
 * @author:zhaoyang
 * @desc:
 **/

@Configuration
public class ProfileConfig {

    @Bean
    @Profile("dev")
    public Demobean devDemoBean(){
        return new Demobean("我是开发模式dev");
    }

    @Bean
    @Profile("prod")
    public Demobean prodDemoBean(){
        return new Demobean("我是线上模式prod");
    }
}
